package org.hzero.order.domain.entity;

import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;

/**
 * @author xiuiqng.Yang-Estelle-양수청
 * @date 2019/8/5 13:55
 */

/**
 * 实体类
 */
@ApiModel("销售订单头")
@ModifyAudit
@VersionAudit
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "hodr_so_header")
@Data
public class Header extends AuditDomain {

    @Id
    @GeneratedValue
    private Long soHeaderId;

    @NotBlank
    @ApiModelProperty("订单编号")
    private String orderNumber;

    @NotNull(message = "公司ID不能为空")
    @ApiModelProperty("公司ID")
    private Long companyId;

    @ApiModelProperty("订单日期")
    private Date orderDate;

    @ApiModelProperty("订单状态")
    private String orderStatus;

    @NotNull(message = "客户ID不能为空")
    @ApiModelProperty("客户ID")
    private Long customerId;

}
